//
//  ANWebService.h
//  Ants
//
//  Created by ZHM on 16/4/24.
//  Copyright © 2016年 ZHM. All rights reserved.
//

#import <Foundation/Foundation.h>

#define sharedWebService [ANWebService sharedInstance]
static NSUInteger const perPage = 6;



@interface ANWebService : NSObject

@property (nonatomic, strong) ANBmobUser *user;

@property (nonatomic, strong) NSMutableArray *categorys;

@property (nonatomic, strong) NSMutableArray *shoppingItems;

@property (nonatomic, strong) NSManagedObjectContext *defaultContext;
@property (nonatomic, strong) NSManagedObjectContext *sharedContext;
+ (ANWebService *)sharedInstance;

//转换
- (BmobObject *)bmobObject:(BmobObject *)productObject FormProduct:(ANBDProduct *)product;
- (ANBDProduct *)productFormBmobObject:(BmobObject *)productObject;
- (ANBDProductCategory *)productCategoryFormBmobObject:(BmobObject *)productCategoryObject;
- (ANBDShoppingItem *)shoppingItemFromBmobObject:(BmobObject *)object;
@end

